home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Deutsche Edition 1
/
Deutsche Edition 1.iso
/
amok
/
001-010
/
amok02
/
iffload
/
showiff.mod
< prev
next >
Wrap
Text File
|
1993-11-04
|
2KB
|
59 lines
(*---------------------------------------------------------------------------
:Program. ShowIFF.mod
:Author. Fridtjof Siebert
:Address. Nobileweg 67, D-7-Stgt-40
:Phone. 0711/822509
:Shortcut. [fbs]
:Version. 1.0
:Date. 20.04.88
:Copyright. PD
:Language. Modula-II
:Translator. M2Amiga
:Imports. IFFLoad [fbs].
:UpDate. none.
:Contents. IFF-Ladeprogramm zum Betrachten von IFF (ILBM)-Bildern.
:Remark. Syntax: ShowIFF <filename>
---------------------------------------------------------------------------*)
MODULE ShowIFF;
FROM SYSTEM IMPORT ADR, ADDRESS, SHIFT, BITSET, LONGSET, CAST;
FROM Arguments IMPORT NumArgs,GetArg;
FROM Intuition IMPORT ScreenPtr,CloseScreen,DisplayBeep,WindowPtr;
FROM IFFLoad IMPORT ReadILBM,ReadILBMFlags,ReadILBMFlagSet;
VAR
MyScreen: ScreenPtr; (* the Picture's ScreenPointer *)
WindowDummy: WindowPtr; (* only a dummy for NIL-Windowpointer *)
Name: ARRAY[0..79] OF CHAR; (* the Picture's Name *)
length: INTEGER; (* dummy for receiving Name's Length *)
Ciapra [0BFE001H]: SET OF (s0,s1,s2,s3,s4,s5,lmb);
(* Ciapra is a Hardware-Register. Bit #6 contains the left Button *)
BEGIN
(*------ Get Name: ------*)
IF NumArgs()#0 THEN
GetArg(1,Name,length);
ELSE
HALT; (* a silly guy didn't say which pic I should load *)
END;
(*------ Read and Show Pic: ------*)
IF ReadILBM(Name,ReadILBMFlagSet{front,visible},MyScreen,WindowDummy) THEN
WHILE lmb IN Ciapra DO END;
(* that's bad style, but it's the easiest way to wait for left Button *)
CloseScreen(MyScreen); (* close the Screen *)
ELSE
DisplayBeep(NIL); (* any error occured: lets display a Beep ! *)
END;
END ShowIFF. That's all. Wasn't that easy ???